<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Tam Nhat Company - Login</title>
        <link type="text/css" rel="stylesheet" href="../css/main.css" />
        <style type="text/css">
            .ui-widget{font-size:90% !important;}
            /*.ui-layout-unit-content{background-image:url('/images/bg.jpg');}*/            
        </style>
    </h:head>
    <h:body>      
        <h:form prependId="false" id="f1">            
            <p:dialog modal="true" widgetVar="statusDialog" header="Loading..."   
                      draggable="false" closable="false" resizable="false">  
                <div align="center">
                                <p:graphicImage value="../images/ajax-login.gif" />  
                </div>
            </p:dialog>
            <p:growl id="ms"/>                        
            <h:panelGrid columns="1" style="margin-left: 300px;margin-top: 140px;">
                <h:graphicImage id="title_login" url="../images/header_login3.png" style="-moz-border-radius: 10px;-webkit-border-radius: 5px;"/>
            </h:panelGrid>
            <h:panelGrid columns="2" style="margin-left: 350px;margin-top: 10px;">                
                <h:graphicImage id="login_key" url="../images/login_key.jpg"/>
                <h:panelGrid columns="1" style="margin: 5px" id="pn">
                    <p:focus context="pn"/>
                   <!-- <h:graphicImage id="evoucher_portal" url="/resources/images/scr_logo.png"/>     -->
                    <h:outputLabel value="Tên đăng nhập" for="usrn" escape="true"/>         
                    <p:inputText id="usrn" title="Nhập tên đăng nhập" value="#{loginBean.strUserName}" label="User Name" />                
                    <h:outputLabel value="Mật khẩu" for="usrp"/>
                    <p:password id="usrp" title="Nhập mật khẩu" value="#{loginBean.strPassword}" label="PassWord"/>
                    <p:commandButton ajax="false" action="#{loginBean.doLogin()}"  id="btnLogin" styleClass="button_login" value="" update=":f1" onclick="statusDialog.show();" oncomplete="statusDialog.hide();">                         
                    </p:commandButton>
                    <!--<f:param name="oldURL" value="#{requestScope['oldURL']}"/>-->
                    <h:graphicImage library="images" name="progress.gif" id="aj1" rendered="#{loginBean.mbRenderedError}"></h:graphicImage>
                    <h:outputText value="#{loginBean.strMsgError}" id="msgErr" style="color: red" rendered="#{loginBean.mbRenderedError}"/>
                    <h:outputText value="Phiên làm việc của bạn đã kết thúc, mời đăng nhập lại!" id="info" style="color: red" rendered="#{redirect.info}"/>
                    <h:graphicImage library="images" name="relogin.png" id="relogin" rendered="#{redirect.info}"></h:graphicImage>
                </h:panelGrid>                             
            </h:panelGrid>
          <!--  <h:panelGrid columns="1" style="margin-left: 350px;margin-top: 30px;">
                <h:graphicImage id="footer_login" url="/resources/images/footer_login.png" style="-moz-border-radius: 10px;-webkit-border-radius: 5px;"/>
            </h:panelGrid> -->
        </h:form>
    </h:body>
</html>